import { useState } from "react";
import A from "./A";
import B from "./B";

export default function App() {
  const [count, setCount] = useState(0);
  const [num, setNum] = useState(0);
  console.log("App组件");
  return (
    <div>
      <p
        onClick={() => {
          setCount(count + 1);
        }}
      >
        count: {count}
      </p>
      <p
        onClick={() => {
          setNum(num + 1);
        }}
      >
        num: {num}
      </p>
      <A count={count} />
      <B />
    </div>
  );
}
